package org.zcl.service.convert;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.zcl.entity.dto.AccountDto;
import org.zcl.enums.PayToolEnum;
import org.zcl.service.factory.ChannelServiceFactory;

/**
 * @author zhuchenglin
 * @since 2022/8/22 14:05
 */
@Component
public class AccountPayConverter implements ChannelPayConverter {

    @Autowired
    private ChannelServiceFactory factory;

    @Override
    public void register() {
        factory.registerChannelPayConverter(PayToolEnum.ACCOUNT.getCode(), this);
    }

    @Override
    public Object convert() {
        AccountDto accountDto = new AccountDto();
        accountDto.setAccountId(11L);
        accountDto.setAmount(100);
        return accountDto;
    }
}
